package com.fs.controller;

import com.fs.pojo.User;
import com.fs.service.UserService;
import com.fs.util.ResponseDataUtil;
import com.fs.vo.ResponseData;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.List;

/**
 * @Version:1.0
 * @Description: TODO(一句话描述该类的功能)
 * @Date: 2024/9/25 19:32
 * @Author: love you qxl
 *
 */
@RestController
public class UserController {
    @Resource
    private UserService userService;

    public void setUserService(UserService userService) {
        this.userService = userService;
    }

    @PostMapping("/userLogin")
    public ResponseData userLogin(@RequestBody User user){
        User login = userService.userLogin(user);
        return ResponseDataUtil.buildOk(login);
    }

//    @RequestMapping("/queryAll")
//    @CrossOrigin
//    public ResponseData queryAll(){
//        List<User> users = userService.queryAll();
//        return ResponseDataUtil.buildOk(users);
//    }
// aaaa 分支6aaa
}
